package com.css.zfzx.fxpg.modules.preestimate.result.repository.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.locationtech.jts.geom.Geometry;

import java.util.Date;

/**
 * @author leon
 * @date 2020-11-19
 */
@Data
@Entity
@Table(name = "fx_preestimate_result")
public class FxPreestimateResultEntity implements Serializable {

    /**
     * 灾区面积/平方公里
     */
    @Column(name = "disaster_area")
    private Double disasterArea;
    /**
     * 需应急处置队伍（人）
     */
    @Column(name = "emergency_team")
    private Integer emergencyTeam;
    /**
     * 灾区人口/万人
     */
    @Column(name = "disaster_area_population")
    private Double disasterAreaPopulation;
    /**
     * 宏观位置
     */
    @Column(name = "location")
    private String location;
    /**
     * 年度
     */
    @Column(name = "year")
    private String year;
    /**
     * 预估死亡人数（修正后）
     */
    @Column(name = "death_num_after")
    private Double deathNumAfter;
    /**
     * 设定地震经度
     */
    @Column(name = "longitude")
    private Double longitude;
    /**
     * 设定地震纬度
     */
    @Column(name = "latitude")
    private Double latitude;
    /**
     * 修改时间
     */
    @Column(name = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
    /**
     * 行政区划组合编码+探槽码
     */
    @Column(name = "object_code")
    private String objectCode;
    /**
     * 预估死亡人数（人）
     */
    @Column(name = "death_num")
    private Double deathNum;
    /**
     * 分区标识
     */
    @Column(name = "partition_flag")
    private String partitionFlag;
    /**
     * 医疗救援(人)
     */
    @Column(name = "medical_rescue_num")
    private Integer medicalRescueNum;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;
    /**
     * 是否有效,0:无效,1:有效
     */
    @Column(name = "is_valid")
    private String isValid;
    /**
     * 工作区名称
     */
    @Column(name = "workspace")
    private String workspace;
    /**
     * 震级
     */
    @Column(name = "magnitude")
    private Double magnitude;
    /**
     * 灾区GDP/亿元
     */
    @Column(name = "disaster_area_gdp")
    private Double disasterAreaGdp;
    /**
     * 预估死亡数（修正前）
     */
    @Column(name = "death_num_before")
    private Double deathNumBefore;
    /**
     * 创建人
     */
    @Column(name = "create_user")
    private String createUser;
    /**
     * 预估经济损失（亿元）
     */
    @Column(name = "economic_loss")
    private Double economicLoss;
    /**
     * 救援部队队伍（人）
     */
    @Column(name = "unit_rescue_num")
    private Integer unitRescueNum;
    /**
     * 修改人
     */
    @Column(name = "update_user")
    private String updateUser;
    /**
     * 预估受伤人数
     */
    @Column(name = "injury_num")
    private Double injuryNum;
    /**
     * 需紧急安置数
     */
    @Column(name = "urgent_arrange_num")
    private Integer urgentArrangeNum;
    /**
     * 预估受伤人数（修正后）
     */
    @Column(name = "injury_num_after")
    private Double injuryNumAfter;
    /**
     * 预估帐篷总数
     */
    @Column(name = "tent_num")
    private Integer tentNum;
    /**
     * ID
     */
    @Id
    @Column(name = "id")
    private String id;


    /**
     * 经纬度点：POINT(77.37 40.74)
     */
    /*@JsonIgnore
    @Column(name = "geo_point")
    private Geometry geoPoint;*/

    /**
     * 经纬度确定省份，根据省份区分不同用户
     */
    @Column(name = "province")
    private String province;

}

